Component({
	properties: {
		showReload: {
			type: Boolean,
			value: true
		},
		title: {
			type: String,
			value: '无网络连接'
		},
		msg: {
			type: String,
			value: '请检查网络后重试'
		}
	},
	data: {},
	methods: {
		refresh() {
			const pages = getCurrentPages()
			console.log(pages)
			if (pages.length > 0) {
				const { route, options } = pages[pages.length - 1]
				const optionsStr = serializeOptions(options)
				wx.reLaunch({
					url: `/${route}?${optionsStr}`
				})
			} else {
				wx.reLaunch({
					url: '/pages/home/index'
				})
			}
		}
	},
	attached() {}
})
